<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>Class application\modules\message\core\wx\Push | IBOS open source</title>

	<link rel="stylesheet" href="resources/bootstrap.min.css?973e37a8502921d56bc02bb55321f45b072b6f71">
	<link rel="stylesheet" href="resources/style.css?49f43d3208c5d7e33fa16d36107a345bf11cc00d">

</head>

<body>
	<nav id="navigation" class="navbar navbar-default navbar-fixed-top">
		<div class="container-fluid">
			<div class="navbar-header">
				<a href="index.html" class="navbar-brand">IBOS open source</a>
			</div>
			<div class="collapse navbar-collapse">

                <form id="search" class="navbar-form navbar-left" role="search">
                    <input type="hidden" name="cx" value="">
                    <input type="hidden" name="ie" value="UTF-8">
                    <div class="form-group">
                        <input type="text" name="q" class="search-query form-control" placeholder="Search">
					</div>
				</form>

				<ul class="nav navbar-nav">
					<li>
						<a href="namespace-application.modules.message.core.wx.html" title="Summary of application\modules\message\core\wx"><span>Namespace</span></a>
					</li>
					<li class="active">
<span>Class</span>					</li>





				</ul>
			</div>
		</div>
	</nav>

	<div id="left">
	<div id="menu">

		<div id="groups">
				<h3>Namespaces</h3>
			<ul>
					<li class="active">
						<a href="namespace-application.html">
							application<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.core.html">
							core<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.core.cache.html">
							cache<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.core.cache.driver.html">
							driver						</a>
							</li>
					<li>
						<a href="namespace-application.core.cache.provider.html">
							provider						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.core.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.core.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.core.engines.html">
							engines<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.core.engines.local.html">
							local						</a>
							</li>
					<li>
						<a href="namespace-application.core.engines.sae.html">
							sae						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.core.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.core.modules.html">
							modules						</a>
							</li>
					<li>
						<a href="namespace-application.core.utils.html">
							utils						</a>
							</li>
					<li>
						<a href="namespace-application.core.widgets.html">
							widgets						</a>
							</li>
								</ul></li>
					<li class="active">
						<a href="namespace-application.modules.html">
							modules<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.article.html">
							article<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.article.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.article.core.html">
							core						</a>
							</li>
					<li>
						<a href="namespace-application.modules.article.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.article.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.calendar.html">
							calendar<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.calendar.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.calendar.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.calendar.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.contact.html">
							contact<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.contact.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.contact.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.contact.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.dashboard.html">
							dashboard<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.dashboard.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.dashboard.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.dashboard.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.department.html">
							department<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.department.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.department.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.department.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.diary.html">
							diary<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.diary.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.diary.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.diary.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.diary.utils.html">
							utils						</a>
							</li>
					<li>
						<a href="namespace-application.modules.diary.widgets.html">
							widgets						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.email.html">
							email<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.email.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.email.core.html">
							core						</a>
							</li>
					<li>
						<a href="namespace-application.modules.email.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.email.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.main.html">
							main<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.main.behaviors.html">
							behaviors						</a>
							</li>
					<li>
						<a href="namespace-application.modules.main.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.main.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.main.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.main.utils.html">
							utils						</a>
							</li>
					<li>
						<a href="namespace-application.modules.main.widgets.html">
							widgets						</a>
							</li>
								</ul></li>
					<li class="active">
						<a href="namespace-application.modules.message.html">
							message<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.message.controllers.html">
							controllers						</a>
							</li>
					<li class="active">
						<a href="namespace-application.modules.message.core.html">
							core<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.message.core.co.html">
							co						</a>
							</li>
					<li class="active">
						<a href="namespace-application.modules.message.core.wx.html">
							wx<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.message.core.wx.callback.html">
							callback						</a>
							</li>
					<li>
						<a href="namespace-application.modules.message.core.wx.event.html">
							event						</a>
							</li>
								</ul></li></ul></li>
					<li>
						<a href="namespace-application.modules.message.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.message.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.mobile.html">
							mobile<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.mobile.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.mobile.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.mobile.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.position.html">
							position<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.position.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.position.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.position.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.recruit.html">
							recruit<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.recruit.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.recruit.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.recruit.core.html">
							core						</a>
							</li>
					<li>
						<a href="namespace-application.modules.recruit.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.recruit.utils.html">
							utils						</a>
							</li>
					<li>
						<a href="namespace-application.modules.recruit.widgets.html">
							widgets						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.role.html">
							role<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.role.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.role.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.user.html">
							user<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.user.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.user.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.user.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.user.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.vote.html">
							vote<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.vote.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.vote.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.vote.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.vote.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.weibo.html">
							weibo<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.weibo.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.weibo.core.html">
							core						</a>
							</li>
					<li>
						<a href="namespace-application.modules.weibo.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.weibo.utils.html">
							utils						</a>
							</li>
								</ul></li></ul></li></ul></li>
			</ul>
		</div>


		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li><a href="class-application.modules.message.core.wx.Callback.html">Callback</a></li>
				<li><a href="class-application.modules.message.core.wx.Code.html">Code</a></li>
				<li><a href="class-application.modules.message.core.wx.Event.html">Event</a></li>
				<li><a href="class-application.modules.message.core.wx.Factory.html">Factory</a></li>
				<li class="active"><a href="class-application.modules.message.core.wx.Push.html">Push</a></li>
				<li><a href="class-application.modules.message.core.wx.WxApi.html">WxApi</a></li>
			</ul>





		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
	<div id="rightInner">
<div id="content" class="class">
	<h1>Class Push</h1>



	<dl class="tree well">
		<dd style="padding-left:0px">
CApplicationComponent
			
			
		</dd>
		<dd style="padding-left:30px">
			<img src="resources/inherit.png" alt="Extended by">
<b><span>application\modules\message\core\wx\Push</span></b>			
			
			
		</dd>
	</dl>








	<div class="alert alert-info">
		
		
		<b>Namespace:</b> <a href="namespace-application.html">application</a>\<a href="namespace-application.modules.html">modules</a>\<a href="namespace-application.modules.message.html">message</a>\<a href="namespace-application.modules.message.core.html">core</a>\<a href="namespace-application.modules.message.core.wx.html">wx</a><br>
		

				<b>Copyright:</b>
				2008-2014 IBOS Inc<br>
				<b>Author:</b>
				banyanCheung <a href="m&#97;&#105;&#108;&#116;&#111;&#58;&#x62;&#x61;&#x6e;&#x79;&#x61;&#x6e;&#x40;i&#98;&#111;&#115;&#46;&#99;&#111;&#109;&#x2e;&#x63;&#x6e;">&#x62;&#x61;&#x6e;&#x79;&#x61;&#x6e;&#x40;i&#98;&#111;&#115;&#46;&#99;&#111;&#109;&#x2e;&#x63;&#x6e;</a><br>
			<b>Located at</b> system/modules/message/core/wx/Push.php		<br>
	</div>



		<div class="panel panel-default">
			<div class="panel-heading"><h2>Methods summary</h2></div>
			<table class="summary table table-bordered table-striped methods" id="methods">
		<tr data-order="sendText" id="_sendText">

			<td class="attributes"><code>
				 public 
				boolean
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_sendText">#</a>
			<code>sendText( <span>array <var>$userIds</var></span>, <span>string <var>$content</var></span>, <span>integer <var>$appId</var></span>, <span>integer <var>$safe</var> = <span class="php-num">0</span></span>, <span>array <var>$toparty</var> = <span class="php-keyword1">array</span>()</span>, <span>array <var>$totag</var> = <span class="php-keyword1">array</span>() </span> )</code>

			<div class="description short">
				<p>推送文字格式的消息</p>
			</div>

			<div class="description detailed hidden">
				<p>推送文字格式的消息</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$userIds</var></dt>
						<dd>推送的微信用户ID</dd>
						<dt><var>$content</var></dt>
						<dd>消息内容</dd>
						<dt><var>$appId</var></dt>
						<dd>应用ID</dd>
						<dt><var>$safe</var></dt>
						<dd>是否保密消息</dd>
						<dt><var>$toparty</var></dt>
						<dd>发送部门范围</dd>
						<dt><var>$totag</var></dt>
						<dd>发送标签范围</dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						boolean<br>推送成功与否
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="sendNews" id="_sendNews">

			<td class="attributes"><code>
				 public 
				boolean
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_sendNews">#</a>
			<code>sendNews( <span>array <var>$userIds</var></span>, <span>array <var>$items</var></span>, <span>integer <var>$appId</var></span>, <span>array <var>$toparty</var> = <span class="php-keyword1">array</span>()</span>, <span>array <var>$totag</var> = <span class="php-keyword1">array</span>() </span> )</code>

			<div class="description short">
				<p>发送图文格式的消息</p>
			</div>

			<div class="description detailed hidden">
				<p>发送图文格式的消息</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$userIds</var></dt>
						<dd>推送的微信用户ID</dd>
						<dt><var>$items</var></dt>
						<dd>图文消息内容项，格式详见 @see handleNewsItems</dd>
						<dt><var>$appId</var></dt>
						<dd>应用ID</dd>
						<dt><var>$toparty</var></dt>
						<dd>发送部门范围</dd>
						<dt><var>$totag</var></dt>
						<dd>发送标签范围</dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						boolean<br>推送成功与否
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="sendVideo" id="_sendVideo">

			<td class="attributes"><code>
				 public 
				boolean
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_sendVideo">#</a>
			<code>sendVideo( <span>array <var>$userIds</var></span>, <span>string <var>$medidaId</var></span>, <span>integer <var>$appId</var></span>, <span>integer <var>$safe</var> = <span class="php-num">0</span></span>, <span>array <var>$toparty</var> = <span class="php-keyword1">array</span>()</span>, <span>array <var>$totag</var> = <span class="php-keyword1">array</span>() </span> )</code>

			<div class="description short">
				<p>发送图文格式的消息</p>
			</div>

			<div class="description detailed hidden">
				<p>发送图文格式的消息</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$userIds</var></dt>
						<dd>推送的微信用户ID</dd>
						<dt><var>$medidaId</var></dt>
						<dd>微信媒体资源ID</dd>
						<dt><var>$appId</var></dt>
						<dd>应用ID</dd>
						<dt><var>$safe</var></dt>
						<dd>是否保密消息</dd>
						<dt><var>$toparty</var></dt>
						<dd>发送部门范围</dd>
						<dt><var>$totag</var></dt>
						<dd>发送标签范围</dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						boolean<br>推送成功与否
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="sendVoice" id="_sendVoice">

			<td class="attributes"><code>
				 public 
				boolean
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_sendVoice">#</a>
			<code>sendVoice( <span>array <var>$userIds</var></span>, <span>string <var>$medidaId</var></span>, <span>integer <var>$appId</var></span>, <span>integer <var>$safe</var> = <span class="php-num">0</span></span>, <span>array <var>$toparty</var> = <span class="php-keyword1">array</span>()</span>, <span>array <var>$totag</var> = <span class="php-keyword1">array</span>() </span> )</code>

			<div class="description short">
				<p>发送音频格式的消息</p>
			</div>

			<div class="description detailed hidden">
				<p>发送音频格式的消息</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$userIds</var></dt>
						<dd>推送的微信用户ID</dd>
						<dt><var>$medidaId</var></dt>
						<dd>微信媒体资源ID</dd>
						<dt><var>$appId</var></dt>
						<dd>应用ID</dd>
						<dt><var>$safe</var></dt>
						<dd>是否保密消息</dd>
						<dt><var>$toparty</var></dt>
						<dd>发送部门范围</dd>
						<dt><var>$totag</var></dt>
						<dd>发送标签范围</dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						boolean<br>推送成功与否
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="sendImage" id="_sendImage">

			<td class="attributes"><code>
				 public 
				boolean
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_sendImage">#</a>
			<code>sendImage( <span>array <var>$userIds</var></span>, <span>string <var>$medidaId</var></span>, <span>integer <var>$appId</var></span>, <span>integer <var>$safe</var> = <span class="php-num">0</span></span>, <span>array <var>$toparty</var> = <span class="php-keyword1">array</span>()</span>, <span>array <var>$totag</var> = <span class="php-keyword1">array</span>() </span> )</code>

			<div class="description short">
				<p>发送图片格式的消息</p>
			</div>

			<div class="description detailed hidden">
				<p>发送图片格式的消息</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$userIds</var></dt>
						<dd>推送的微信用户ID</dd>
						<dt><var>$medidaId</var></dt>
						<dd>微信媒体资源ID</dd>
						<dt><var>$appId</var></dt>
						<dd>应用ID</dd>
						<dt><var>$safe</var></dt>
						<dd>是否保密消息</dd>
						<dt><var>$toparty</var></dt>
						<dd>发送部门范围</dd>
						<dt><var>$totag</var></dt>
						<dd>发送标签范围</dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						boolean<br>推送成功与否
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="handleFileType" id="_handleFileType">

			<td class="attributes"><code>
				 protected 
				string
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_handleFileType">#</a>
			<code>handleFileType( <span>string <var>$ext</var></span>, <span>integer <var>$size</var></span> )</code>

			<div class="description short">
				<p>处理文件格式的类型描述</p>
			</div>

			<div class="description detailed hidden">
				<p>处理文件格式的类型描述</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$ext</var></dt>
						<dd>文件后缀</dd>
						<dt><var>$size</var></dt>
						<dd>文件大小</dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						string<br>符合微信端的格式则返回文件类型，否则返回空串
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="handleNewsItems" id="_handleNewsItems">

			<td class="attributes"><code>
				 protected 
				string
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_handleNewsItems">#</a>
			<code>handleNewsItems( <span>array <var>$items</var></span> )</code>

			<div class="description short">
				<p>处理图文格式的项目为字符串</p>
			</div>

			<div class="description detailed hidden">
				<p>处理图文格式的项目为字符串</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$items</var></dt>
						<dd></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						string
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="handleSendScope" id="_handleSendScope">

			<td class="attributes"><code>
				 protected 
				
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_handleSendScope">#</a>
			<code>handleSendScope( <span>array <var>&amp; $param</var></span>, <span>mixed <var>$userIds</var> = <span class="php-keyword1">array</span>()</span>, <span>array <var>$toparty</var> = <span class="php-keyword1">array</span>()</span>, <span>array <var>$totag</var> = <span class="php-keyword1">array</span>() </span> )</code>

			<div class="description short">
				<p>处理主动发送消息范围</p>
			</div>

			<div class="description detailed hidden">
				<p>处理主动发送消息范围</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$param</var></dt>
						<dd></dd>
						<dt><var>$userIds</var></dt>
						<dd></dd>
						<dt><var>$toparty</var></dt>
						<dd></dd>
						<dt><var>$totag</var></dt>
						<dd></dd>
					</dl></div>





			</div>
			</div></td>
		</tr>
			</table>
		</div>











</div>
	</div>

	<div id="footer">
		IBOS open source API documentation generated by <a href="http://apigen.org">ApiGen</a>
	</div>
</div>
<script src="resources/combined.js"></script>
<script src="elementlist.js"></script>
</body>
</html>
